<template>
  <div class="app-container">
    <part-comp title="活动规则" />
    <div class="whitebg boxradius mt_20" v-loading='loading'>
        <div class="editboxcontent" v-html="msg"></div>
    </div>
  </div>
</template>

<script>
import PartComp from '@/components/PartComp';
import { setTextDate,getTextData } from '@/api/activerule';
export default {
    components:{
        PartComp
    },
    data(){
        return {
            msg:'',
            loading:false,
        }
    },

    created(){
        this.getData();
    },

    methods:{

        decodeHTM(html){
            var txt =document.createElement('textarea');
            txt.innerHTML = html;
            return txt.value;
        },

        getData(){
            this.loading=true;
           getTextData().then(res=>{
                this.msg = this.decodeHTM(res.data);
                this.loading=false;
           })     
        },
    }
}
</script>

<style lang="scss" scoped>
.home_header{
    color: #000;
    font-size: 15px;
    font-weight: bold;
    margin: 15px 0;
}
.boxradius{
    border-radius: 6px;
    padding: 20px;
}

</style>
<style lang="scss">
.editboxcontent {
    width: 100%;
    img {
        max-width: 100%;
    }
}
</style>